package com.zz.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.ToStringSerializer;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 角色信息
 * @author zhouzi
 */
@Data
@ApiModel("角色信息")
public class Role implements Serializable {
    private static final long serialVersionUID = 1L;

    //编号
    @ApiModelProperty("编号")
    @TableId(type= IdType.AUTO)//主键自增
    @NotNull(message = "角色表主键不能为空")
    private Integer id;

    //角色名
    @ApiModelProperty("角色名")
    @NotNull(message = "角色名不能为空")
    private String name;

    //描述
    @ApiModelProperty("描述")
    @NotNull(message = "角色描述不能为空")
    private String description;

    //角色显示名
    @ApiModelProperty("角色显示名")
    @NotNull(message = "角色显示名不能为空")
    private String realname;



}
